/// @tags: SG
#include <cctype>
#include <cstdio>

namespace BlueQuantum {

int const N = 5e5 + 5;

template <typename T>
inline T &read(T &x) {
  x = 0;
  bool f = false;
  short ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = true;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + (ch ^ '0'), ch = getchar();
  if (f) x = -x;
  return x;
}

int n;
int a[N];

inline int main() {
  read(n);
  for (int i = 1; i <= n; ++i) { a[0] ^= read(a[i]); }
  if (!a[0]) puts("lose");
  else {
    for (int i = 1; i <= n; ++i) {
      if ((a[i] ^ a[0]) < a[i]) {
        printf("%d %d\n", a[i] - (a[i] ^ a[0]), i);
        a[i] = a[i] ^ a[0];
        for (int i = 1; i <= n; ++i) printf("%d ", a[i]);
        return 0;
      }
    }
  }
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("P1247 取火柴游戏.in", "r", stdin);
  freopen("P1247 取火柴游戏.out", "w", stdout);
#endif
#endif

  return BlueQuantum::main();
}